<style>
    .row1{
        margin-bottom:10px;
    }
    label{
        text-align: center;
    }
</style>
<div id="studentGoManage">
    <form id="password">
        <input type="hidden" name="id" value="{$admin.id}">
    <div class="row row1">
        <label class="col-sm-5 control-label">旧密码：</label>
        <div class="col-sm-5">
            <input type="password" class="form-control" name="oldPassword" value="">
        </div>
    </div>
    <div class="row row1">
        <label class="col-sm-5 control-label">新密码：</label>
        <div class="col-sm-5">
            <input type="password" class="form-control" name="password" id="onePass">
        </div>
    </div>
    <div class="row">
        <label class="col-sm-5 control-label">确认新密码：</label>
        <div class="col-sm-5">
            <input type="password" class="form-control" name="surePassword" id="twoPass">
        </div>
    </div>
        <br/>


        <!--<div class="row row1">-->
            <!--<div class="col-sm-2">-->

            <!--</div>-->
            <!--<div class="col-sm-3">-->
                <!--<input type="text" class="form-control" name="usercode" placeholder="请输入验证码">-->
            <!--</div>-->
            <!--<div class="col-sm-3">-->
                <!--<p style="font-size: 13px;color: red;line-height: 30px;text-align: center;">-->
                    <!--<a href="JavaScript:;" id="yzm" class="go" style="margin-left:20px;text-decoration:none;display:inline-block;width:120px;border-radius:5px;line-height: 30px;height: 30px;background-color: dodgerblue;color:#fff;text-align: center;font-size: 14px">-->
                        <!--获取验证码-->
                    <!--</a>-->
                <!--</p>-->
            <!--</div>-->

        <!--</div>-->
</form>
</div>
<script>
    var intv;
    $('#yzm').click(function () {
        if($(this).hasClass('go')){
            $('#yzm').css({'background-color':'#ccc'});
            $('#yzm').text('59秒后重新获取');
            $('#yzm').removeClass('go');
            intv = setInterval("timego()",1000);
            $.ajax({
                url:'admin/Admin/getPhoneCode',
                data:'type=1',
                type:'POST',
                dataType:'JSON',
                success:function(returndata){
                    if (returndata.status != 200) {
                        $.TeachDialog({
                            content: returndata.msg
                        });
                    }
                },
                error: function () {
                    $.TeachDialog({
                        content: '系统异常，请联系管理员'
                    });
                }
            });
        }else{
            return;
        }
    });
    function timego() {
        var m = parseInt($('#yzm').text());
        var nm = m-1;
        if(nm > 0){
            $('#yzm').text(nm+'秒后重新获取');
        }else{
            $('#yzm').css({'background-color':'dodgerblue'});
            $('#yzm').text('获取验证码');
            $('#yzm').addClass('go');
            clearInterval(intv);
            return;
        }

    }
</script>